import ruleData from './rule.js'

// 设置表单数据json
function typeList(){
	let data = uni.getStorageSync('typeList');
	let typeListMap = new Map();
	data.forEach(item=>{
		typeListMap.set(item.key,item.value);
	})
	return typeListMap
}

// 小表单类型值
let minFormType = new Map([
	['overduepay',34],		// 逾期尚未支付合同情况
	['baseinfo',11],		// 基本信息
	['subcapital',28],		// 股东及出资信息
	['empnum',1],			// 从业人数（其中）
	['websiteinfo',27],		// 网站或网店信息
	['sfcBranchinfo',10],	// 分支机构情况
	['alterstockinfo',29],	// 股权变更信息
	['forinvestment',16],	// 对外投资信息
	['assetinfo',31],		// 资产状况信息
	['sfcLicenceinfo',30],	// 行政许可信息
	['forguaranteeinfo',17],// 对外担保信息
	['socsecinfo',24],		// 社保信息
	['partybuilding',9],	// 党建信息
	['cuEntreginfo',19],	// 报关信息
	['wsBaseinfo',13],		// 外商投资基本情况
	['wsSubcapital',18],	// 投资者信息
	['operateinfo',14],		// 外商投资经营情况
	['debtinfo',7],			// 债权、债务情况
	['dutyFreeinfo',33],	// 进口设备减免税情况
	['assetsLiabilitiesinfo',32],	// 资产负债情况
])


// 年报类型值
let stateType = new Map([
	['00','待提交'],
	['01','待公示'],
	['02','已公示'],
	['03','已修改待公示'],
])


// 小表单接口，获取小表单数据
let minFormUrl = new Map([
	['overduepay','/annual/report/overduepay/list'],			// 逾期尚未支付合同情况+++++++++++++++++++++++++++++++++
	['baseinfo','/annual/report/baseinfo/get-baseinfo'],		// 基本信息————老表单 >>> 对象
	['subcapital','/annual/report/subcapital/list'],			// 股东及出资信息————特殊类型处理----------
	['empnum','/annual/report/baseinfo/get-empnum'],			// 从业人数（其中）————老表单 >>> 对象
	['websiteinfo','/annual/report/websiteinfo/list'],			// 网站或网店信息————特殊类型处理————有是否
	['sfcBranchinfo','/annual/report/sfc-branchinfo/list'],		// 分支机构情况————特殊类型处理----------
	['alterstockinfo','/annual/report/alterstockinfo/list'],	// 股权变更信息————特殊类型处理————有是否
	['forinvestment','/annual/report/forinvestment/list'],		// 对外投资信息————特殊类型处理————有是否
	['assetinfo','/annual/report/baseinfo/get-assetinfo'],		// 资产状况信息————老表单 >>> 对象
	['sfcLicenceinfo','/annual/report/sfc-licenceinfo/list'],	// 行政许可信息————特殊类型处理----------
	['forguaranteeinfo','/annual/report/forguaranteeinfo/list'],// 对外担保信息————特殊类型处理————有是否
	['socsecinfo','/annual/report/socsecinfo/list'],			// 社保信息+++++++++++++++++++++++++++++++++
	['partybuilding','/annual/report/baseinfo/get-partybuilding'],	// 党建信息————老表单 >>> 对象
	['cuEntreginfo','/annual/report/cu-entreginfo/list'],		// 报关信息+++++++++++++++++++++++++++++++++
	['wsBaseinfo','/annual/report/ws-baseinfo/get-wsbaseinfo'],			// 外商投资基本情况————老表单 >>> 对象 
	['wsSubcapital','/annual/report/ws-subcapital/list'],		// 投资者信息————特殊类型处理----------
	['operateinfo','/annual/report/ws-baseinfo/get-wsoperateinfo'],		// 外商投资经营情况————老表单 >>> 对象
	['debtinfo','/annual/report/ws-baseinfo/get-wsdebtinfo'],		// 债权、债务情况————老表单 >>> 对象
	['dutyFreeinfo','/annual/report/ws-baseinfo/get-wsdutyfreeinfo'],		// 进口设备减免税情况————老表单 >>> 对象
	['assetsLiabilitiesinfo','/annual/report/ws-baseinfo/get-wsassetsliabilitiesinfo'],		// 资产负债情况————老表单 >>> 对象
])



/* 
	接口类型处理
	1：特殊类型处理————有是否
	2：特殊类型处理
	3：老表单 >>> 对象
	4：新表单 >>> 数组
	< 未知类型按 “ 新表单 >>> 数组 ” 处理 >
*/
let requertReturnType = new Map([
	['overduepay',4],		// 逾期尚未支付合同情况+++++++++++++++++++++++++++++++++
	['baseinfo',3],			// 基本信息————老表单 >>> 对象
	['subcapital',2],		// 股东及出资信息————特殊类型处理----------
	['empnum',3],			// 从业人数（其中）————老表单 >>> 对象
	['websiteinfo',1],		// 网站或网店信息————特殊类型处理————有是否
	['sfcBranchinfo',2],	// 分支机构情况————特殊类型处理----------
	['alterstockinfo',1],	// 股权变更信息————特殊类型处理————有是否
	['forinvestment',1],	// 对外投资信息————特殊类型处理————有是否
	['assetinfo',3],		// 资产状况信息————老表单 >>> 对象
	['sfcLicenceinfo',2],	// 行政许可信息————特殊类型处理----------
	['forguaranteeinfo',1],	// 对外担保信息————特殊类型处理————有是否
	['socsecinfo',4],		// 社保信息+++++++++++++++++++++++++++++++++
	['partybuilding',3],	// 党建信息————老表单 >>> 对象
	['cuEntreginfo',4],		// 报关信息+++++++++++++++++++++++++++++++++
	['wsBaseinfo',3],		// 外商投资基本情况————老表单 >>> 对象
	['wsSubcapital',2],		// 投资者信息————特殊类型处理----------
	['operateinfo',3],		// 外商投资经营情况————老表单 >>> 对象
	['debtinfo',3],		// 债权、债务情况————老表单 >>> 对象
	['dutyFreeinfo',3],		// 进口设备减免税情况————老表单 >>> 对象
	['assetsLiabilitiesinfo',3],		// 资产负债情况————老表单 >>> 对象
])


// 每年年报填写截止日期
let cutOffTimer = {
	month: '06',
	day: '30',
};




const typeData = {
	typeList, 
	// companyType,  // 老版本使用，现已废弃
	minFormType,
	stateType,
	minFormUrl,
	requertReturnType,
	ruleData,
	cutOffTimer
}

export default typeData























// 原版本老数据↓↓↓

// 所有企业类型
// let typeList = new Map([
// 	[
// 		'大型企业', //大型企业
// 		{
// 			"overduepay": "isodsmepay,odsmepayconnum,odsmepayconam,filinstr",
// 			"疫苗生产许可证": "暂时没表",
// 			"充装单位许可证": "暂时没表",
// 			"特种设备生产许可证": "暂时没表",
// 			"特种设备信息": "暂时没表",
// 			"baseinfo": "ancheyear,entname,uniscid,addr,postalcode,tel,email,mainbusiact,empnum,empnumdis,womempnum,womempnumdis,busst,busstCn,holdingsmsg,holdingsmsgdis",
// 			"subcapital": "invname,lisubconam,subcondate,subconform,liacconam,accondate,acconform",
// 			"websiteinfo": "webtype,websitname,website",
// 			"alterstockinfo": "inv,altdate,transampr,transamaft",
// 			"forinvestment": "entname,uniscid",
// 			"assetinfo": "assgro,assgrodis,totequ,totequdis,liagro,liagrodis,vendinc,vendincdis,maibusinc,maibusincdis,progro,progrodis,netinc,netincdis,ratgro,ratgrodis",
// 			"forguaranteeinfo": "moredis,more,mortgagor,priclaseckind,priclasecam,pefperform,pefperto,guaranperiod,gatype",
// 			"socsecinfo": "so110,so210,so310,so410,so510,totalwagesSo110,totalwagesSo210,totalwagesSo310,totalwagesSo510,totalwagesdis,totalpaymentSo110,totalpaymentSo210,totalpaymentSo310,totalpaymentSo410,totalpaymentSo510,totalpaymentdis,unpaidsocialinsSo110,unpaidsocialinsSo210,unpaidsocialinsSo310,unpaidsocialinsSo410,unpaidsocialinsSo510,unpaidsocialinsdis"
// 		}
// 	],
// 	[
// 		'分公司', //分公司
// 		{
// 			"特种设备信息": "暂时没表",
// 			"baseinfo": "ancheyear,entname,uniscid,dependententname,depuniscid,addr,postalcode,tel,email,mainbusiact,empnum,empnumdis,womempnum,womempnumdis,busst",
// 			"assetinfo": "maibusinc,maibusincdis,ratgro,ratgrodis,netinc,netincdis",
// 			"websiteinfo": "webtype,websitname,website",
// 			"forguaranteeinfo": "moredis,more,mortgagor,priclaseckind,priclasecam,pefperform,pefperto,guaranperiod,gatype",
// 			"socsecinfo": "so110,so210,so310,so410,so510,totalwagesSo110,totalwagesSo210,totalwagesSo310,totalwagesSo510,totalwagesdis,totalpaymentSo110,totalpaymentSo210,totalpaymentSo310,totalpaymentSo410,totalpaymentSo510,totalpaymentdis,unpaidsocialinsSo110,unpaidsocialinsSo210,unpaidsocialinsSo310,unpaidsocialinsSo410,unpaidsocialinsSo510,unpaidsocialinsdis"
// 		}
// 	],
// 	[
// 		'海关', //海关
// 		{
// 			"充装单位许可证": "暂时没表",
// 			"特种设备生产许可证": "暂时没表",
// 			"特种设备信息": "暂时没表",
// 			"baseinfo": "ancheyear,entname,uniscid,addr,postalcode,tel,email,mainbusiact,empnum,empnumdis,womempnum,womempnumdis,busst,holdingsmsg,holdingsmsgdis",
// 			"subcapital": "invname,lisubconam,subcondate,subconform,liacconam,accondate,acconform",
// 			"websiteinfo": "webtype,websitname,website",
// 			"alterstockinfo": "inv,altdate,transampr,transamaft",
// 			"forinvestment": "entname,uniscid",
// 			"assetinfo": "assgro,assgrodis,totequ,totequdis,liagro,liagrodis,vendinc,vendincdis,maibusinc,maibusincdis,progro,progrodis,netinc,netincdis",
// 			"forguaranteeinfo": "moredis,more,mortgagor,priclaseckind,priclasecam,pefperform,pefperto,guaranperiod,gatype",
// 			"socsecinfo": "so110,so210,so310,so410,so510,totalwagesSo110,totalwagesSo210,totalwagesSo310,totalwagesSo510,totalwagesdis,totalpaymentSo110,totalpaymentSo210,totalpaymentSo310,totalpaymentSo410,totalpaymentSo510,totalpaymentdis,unpaidsocialinsSo110,unpaidsocialinsSo210,unpaidsocialinsSo310,unpaidsocialinsSo410,unpaidsocialinsSo510,unpaidsocialinsdis",
// 			"cuEntreginfo": "enfullco,enaddrco,crossbordertradeflags,accobanknm,accono,specialtradezone,apanageregion,cusspename,cusspecertype,cusspecerno,cusspetel,cusspemobile,cusspeemail,contacname,contacttel,contactmobile,contactemail,contactfax,siteflag,marketflag,accountflag,finsoft,accounttype,accountname,accountsocialcreditcode,accountaddr,accountcontact,accounttel,sustainedlosses,goodsinstock,cashliability,circulatingassets,netcashflow,operatingprofit,ownersequity,isaudited,existingproblems,problems"
// 		}
// 	],
// 	[
// 		'农专', //农专
// 		{
// 			"特种设备生产许可证": "暂时没表",
// 			"baseinfo": "ancheyear,entname,uniscid,tel,email,addr,memnum,farnum,annnewmemnum,annredmemnum,mainbusiact,empnum,empnumdis,womempnum,womempnumdis",
// 			"websiteinfo": "webtype,websitname,website",
// 			"sfcBranchinfo": "brname,uniscid",
// 			"assetinfo": "priyeasales,priyeasalesdis,priyeaprofit,priyeaprofitdis,ratgro,ratgrodis,priyeasub,priyeasubdis,priyealoan,priyealoandis",
// 			"sfcLicenceinfo": "licname,licnameCn,valto",
// 			"socsecinfo": "so110,so210,so310,so410,so510,totalwagesSo110,totalwagesSo210,totalwagesSo310,totalwagesSo510,totalwagesdis,totalpaymentSo110,totalpaymentSo210,totalpaymentSo310,totalpaymentSo410,totalpaymentSo510,totalpaymentdis,unpaidsocialinsSo110,unpaidsocialinsSo210,unpaidsocialinsSo310,unpaidsocialinsSo410,unpaidsocialinsSo510,unpaidsocialinsdis"
// 		}
// 	],
// 	[
// 		'外商', //外商
// 		{
// 			"疫苗生产许可证": "暂时没表",
// 			"充装单位许可证": "暂时没表",
// 			"特种设备生产许可证": "暂时没表",
// 			"特种设备信息": "暂时没表",
// 			"baseinfo": "ancheyear,entname,uniscid,addr,postalcode,tel,email,mainbusiact,empnum,empnumdis,womempnum,womempnumdis,busst,holdingsmsg,holdingsmsgdis",
// 			"subcapital": "invname,lisubconam,subcondate,subconform,liacconam,accondate,acconform",
// 			"websiteinfo": "webtype,websitname,website",
// 			"alterstockinfo": "inv,altdate,transampr,transamaft",
// 			"forinvestment": "entname,uniscid",
// 			"assetinfo": "assgro,assgrodis,totequ,totequdis,liagro,liagrodis,vendinc,vendincdis,maibusinc,maibusincdis,progro,progrodis,netinc,netincdis,ratgro,ratgrodis",
// 			"forguaranteeinfo": "moredis,more,mortgagor,priclaseckind,priclasecam,pefperform,pefperto,guaranperiod,gatype",
// 			"socsecinfo": "so110,so210,so310,so410,so510,totalwagesSo110,totalwagesSo210,totalwagesSo310,totalwagesSo510,totalwagesdis,totalpaymentSo110,totalpaymentSo210,totalpaymentSo310,totalpaymentSo410,totalpaymentSo510,totalpaymentdis,unpaidsocialinsSo110,unpaidsocialinsSo210,unpaidsocialinsSo310,unpaidsocialinsSo410,unpaidsocialinsSo510,unpaidsocialinsdis",
// 			"wsBaseinfo": "enentname,opscope,specmanagement,specmameasures,listareas,listent,listtype,publiccompany,funinstitutions,funinsttype,rdcent,leindependentrd,subcomrdcent,subcomrdcentnum,indeprddiv,rddivnum,foreigninvtype,foreemnum,uniaboempnum,curyearsalary,demdepauthnum,outdepauthnum",
// 			"wsSubcapital": "investor,eninvestor,country,certype,cerno,capsoul,worldentinv,entname,contequam,invnature,invtype,mcserprovider,mcinvestor,invoverseachinese,shareholdingratio,kindcode",
// 			"operateinfo": "opcost,opexp,rdspending,vat,busitax,consumtax,entincometax,indincometax,tariffs,allotforprofits,remitforprofits,fornetprofit,forproftoinv,increaseregcap,transothent",
// 			"debtinfo": "forloanfloatation,forloanrepayment,liabilitiestotal,depositam,credrighttotal",
// 			"dutyFreeinfo": "imeqduty,forinvindustry,cenwesforinvind,isOtherInd,forinvindustryCode,cenwesforinvindCode",
// 			"assetsLiabilitiesinfo": "currentassets,noncurrentassets,othereceivables,loequinv,netfixassets,intass,fordividend,noncurrentliabilities,otherpayables,reccap,capre,surpres,undisprofit,other,invsequity,forreccap,forcapre,forsurpres,forundisprofit,forother,currentliabilities"
// 		}
// 	],
// 	[
// 		'有限公司', //有限公司
// 		{
// 			"疫苗生产许可证": "暂时没表",
// 			"充装单位许可证": "暂时没表",
// 			"特种设备生产许可证": "暂时没表",
// 			"特种设备信息": "暂时没表",
// 			"baseinfo": "ancheyear,entname,uniscid,addr,postalcode,tel,email,mainbusiact,empnum,empnumdis,womempnum,womempnumdis,busst,holdingsmsg,holdingsmsgdis",
// 			"subcapital": "invname,lisubconam,subcondate,subconform,liacconam,accondate,acconform",
// 			"websiteinfo": "webtype,websitname,website",
// 			"alterstockinfo": "inv,altdate,transampr,transamaft",
// 			"forinvestment": "entname,uniscid",
// 			"assetinfo": "assgro,assgrodis,totequ,totequdis,liagro,liagrodis,vendinc,vendincdis,maibusinc,maibusincdis,progro,progrodis,netinc,netincdis,ratgro,ratgrodis",
// 			"forguaranteeinfo": "moredis,more,mortgagor,priclaseckind,priclasecam,pefperform,pefperto,guaranperiod,gatype",
// 			"socsecinfo": "so110,so210,so310,so410,so510,totalwagesSo110,totalwagesSo210,totalwagesSo310,totalwagesSo510,totalwagesdis,totalpaymentSo110,totalpaymentSo210,totalpaymentSo310,totalpaymentSo410,totalpaymentSo510,totalpaymentdis,unpaidsocialinsSo110,unpaidsocialinsSo210,unpaidsocialinsSo310,unpaidsocialinsSo410,unpaidsocialinsSo510,unpaidsocialinsdis"
// 		}
// 	],
// 	[
// 		'9600', //个体工商
// 		{
// 			"baseinfo": "ancheyear,name,uniscid,regno,traname,tel,fundam,empnum",
// 			"empnum": "colgranum,retsolnum,dispernum,unenum,colemplnum,retemplnum,disemplnum,uneemplnum",
// 			"assetinfo": "vendinc,vendincdis,ratgro,ratgrodis",
// 			"websiteinfo": "websiteList",
// 			"partybuilding": "partybuilding,parins,parinsCn,numparm,resparmsign,resparsecsign"
// 		}
// 	]
// ])


// 企业大类类型编码
// function companyType(value){
// 	let data = new Map([
// 		['large', '大型企业'],	// 大型企业
// 		['branch', '分公司'],	// 分公司
// 		['customs', '海关'],	// 海关
// 		['farmer', '农专'],		// 农专
// 		['foreign', '外商'],	// 外商
// 		['limited', '有限公司'],	// 有限公司
// 		['individual', '9600'],	// 个体工商
// 	])
// 	let name = data.get(value);
// 	return name;
// }